home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / PartMaker 4.4 / PartMaker Documents / Script Runner• / Script Runner•.rsrc / dFRK_5062 < prev    next >
Encoding:
Text File  |  1995-12-12  |  2.5 KB  |  111 lines

  1. /*------------------------------------------------------------------------------
  2.     File:        ScriptRunnerGlobals.idl
  3.  
  4.     Contains:    ScriptRunner globals
  5.  
  6.     Written by:    Sue Dumont
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9. ------------------------------------------------------------------------------*/
  10.  
  11. #ifndef _SCRIPTRUNNERGLOBALS_
  12. #define _SCRIPTRUNNERGLOBALS_
  13.  
  14. #ifndef SOM_Module_OpenDoc_Global_TypesB_defined
  15. #include <ODTypesB.xh>
  16. #endif
  17.  
  18. #ifndef SOM_ODExtension_xh
  19. #include <Extensn.xh>
  20. #endif
  21.  
  22. #ifndef SOM_ODWindow_xh
  23. #include <Window.xh>
  24. #endif
  25.  
  26. #ifndef SOM_Samples_PaletteExt_xh
  27. #include "PaletteExt.xh"
  28. #endif
  29.  
  30. #ifndef SOM_TextTransferExt_xh
  31. #include "TextTransferExt.xh"
  32. #endif
  33.  
  34. #ifndef _CSCRIPTER_
  35. #include "CScripter.h"
  36. #endif
  37.  
  38. //==============================================================================
  39. // Globals
  40. //==============================================================================
  41.  
  42. struct ScriptRunnerGlobals;     // forward
  43.  
  44. extern    ODUShort                gGlobalsUsageCount;
  45. extern    ScriptRunnerGlobals*    gGlobals;
  46.  
  47.  
  48. struct ScriptRunnerGlobals {
  49.     public:
  50.     ScriptRunnerGlobals();
  51.     ~ScriptRunnerGlobals() {}
  52.                 
  53.     ODTypeToken                fModalFocus;
  54.     ODTypeToken                fFrameView;
  55.     ODTypeToken                fPalettePresentation;
  56.     ODTypeToken                fResultPresentation;
  57.     ODValueType                fTextKind;
  58.  
  59.     ODPart*                    fClient;
  60.     CScripter*                fOSAScripter;
  61.     ODExtension*            fPaletteExtension;
  62.     TextTransferExt*        fTextTransferExt;
  63.     
  64.     ODID                    fPaletteID;
  65.     ODID                    fResultID;
  66.     ODISOStr                fResultValue;
  67.     ODHandle                fPalette;
  68.     ODHandle                fFloatWindowProc;
  69.     ODHandle                fDisabledRecButton;
  70.     
  71.     ODBoolean                fPaletteVisible;
  72.     ODBoolean                fResultWindowVisible;
  73.     ODBoolean                fResultHidden;
  74.     
  75.     Rect                    fPaletteBounds;
  76.     Rect                    fResultBounds;
  77. };
  78.  
  79.  
  80.  
  81. inline ScriptRunnerGlobals::ScriptRunnerGlobals()
  82. {
  83.     fModalFocus                = kODNullTypeToken;
  84.     fFrameView                = kODNullTypeToken;
  85.     fPalettePresentation    = kODNullTypeToken;
  86.     fResultPresentation        = kODNullTypeToken;
  87.     fTextKind                = kODNullTypeToken;
  88.     
  89.     fClient                    = kODNULL;
  90.     fOSAScripter            = kODNULL;
  91.     fPaletteExtension        = kODNULL;
  92.     fTextTransferExt        = kODNULL;
  93.     fPaletteID                = kODNULLID;
  94.     fResultID                = kODNULLID;
  95.     
  96.     fResultValue            = kODNULL;
  97.     
  98.     fPalette                = kODNULL;    
  99.     fFloatWindowProc        = kODNULL;
  100.     fDisabledRecButton        = kODNULL;
  101.     
  102.     fPaletteVisible            = kODFalse;
  103.     fResultWindowVisible    = kODFalse;
  104.     
  105.     // This flag is used by the palette to hide
  106.     // the result window when it is being hidden,
  107.     // and then show it again when it is shown. 
  108.     fResultHidden            = kODFalse;
  109. };
  110.  
  111. #endif